package six;

import java.util.Calendar;
import java.util.GregorianCalendar;

public class Grego {
    public static void main(String[] args) {
        Grego G = new Grego();
        G.showDate();
        G.setTime(1234567898765L);
        G.showDate();

    }
    GregorianCalendar now = new GregorianCalendar();
    void showDate(){
        System.out.println("年月日：");
        System.out.println(now.get(Calendar.YEAR)+" "+now.get(Calendar.MONTH)+" "+now.get(Calendar.DAY_OF_MONTH));
    }
    void setTime(long  n){
        now.setTimeInMillis(n);
    }
}
